<?php

namespace app\libs\GoogleMapSDK\Action;

use app\libs\GoogleMapSDK\GoogleMap;

class GoogleAddress extends GoogleMap
{
    public function validate_address($address)
    {
        return $this->setPath('/v1:validateAddress?key='.self::SECRET_KEY)
               ->setMethod('POST')
               ->setOption([
                   'json'=>[
                       'address'=>[
                   'addressLines'=>[$address]
               ]],
                   'verify'=>false
               ])
            ->send();
    }
}